/**
 * Copyright (C) 2009 All Rights Reserved
 * @author sebastian chang
 * @brief practice
 */


#ifndef _H_LOCK_H_
#define _H_LOCK_H_

#include <stdlib.h>

namespace trident {

/**
 * @brief the interface of all lock
 */
class lock_i
{
public:

    /**
     * @brief virtual destructor
     */
    virtual ~lock_i() {}

    /**
     * @brief initialize
     */
    virtual int init(void* arg_ = NULL) = 0;

    /**
     * @brief lock
     */
    virtual int lock() = 0;

    /**
     * @brief unlock
     */
    virtual int unlock() = 0;
};


} // namespace trident

#endif // _H_LOCK_H_
